package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BillLableMapper;
import com.ruoyi.system.domain.BillLable;
import com.ruoyi.system.service.IBillLableService;
import com.ruoyi.common.core.text.Convert;

/**
 * 账单标签Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-03-17
 */
@Service
public class BillLableServiceImpl implements IBillLableService 
{
    @Autowired
    private BillLableMapper billLableMapper;

    /**
     * 查询账单标签
     * 
     * @param id 账单标签主键
     * @return 账单标签
     */
    @Override
    public BillLable selectBillLableById(Long id)
    {
        return billLableMapper.selectBillLableById(id);
    }

    /**
     * 查询账单标签列表
     * 
     * @param billLable 账单标签
     * @return 账单标签
     */
    @Override
    public List<BillLable> selectBillLableList(BillLable billLable)
    {
        return billLableMapper.selectBillLableList(billLable);
    }

    /**
     * 新增账单标签
     * 
     * @param billLable 账单标签
     * @return 结果
     */
    @Override
    public int insertBillLable(BillLable billLable)
    {
        billLable.setCreateTime(DateUtils.getNowDate());
        return billLableMapper.insertBillLable(billLable);
    }

    /**
     * 修改账单标签
     * 
     * @param billLable 账单标签
     * @return 结果
     */
    @Override
    public int updateBillLable(BillLable billLable)
    {
        billLable.setUpdateTime(DateUtils.getNowDate());
        return billLableMapper.updateBillLable(billLable);
    }

    /**
     * 批量删除账单标签
     * 
     * @param ids 需要删除的账单标签主键
     * @return 结果
     */
    @Override
    public int deleteBillLableByIds(String ids)
    {
        return billLableMapper.deleteBillLableByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除账单标签信息
     * 
     * @param id 账单标签主键
     * @return 结果
     */
    @Override
    public int deleteBillLableById(Long id)
    {
        return billLableMapper.deleteBillLableById(id);
    }
}
